import request from '../utils/request';

/**
 * 获取建模一览
 * @param {*} params
 */
const getPage = params => request({
  url: `/v1/project/doc/${params.id}/page`,
  method: 'get'
});
/**
 * 创建建模一览
 * @param {*} data
 */
const create = data => request({
  url: `/v1/project/doc`,
  method: 'post',
  data
});
/**
 * 获取一条数据
 * @param {*} params
 */
const getDataById = params => request({
  url: `/v1/project/doc/${params.id}`,
  method: 'get'
});
/**
 * 保存数据
 * @param {*} data
 */
const saveById = data => request({
  url: `/v1/project/doc/${data.Projectid}`,
  method: 'put',
  data
});

export default {
  getPage,
  create,
  getDataById,
  saveById
}